/***************************************************************************
 *            un_client_test.c
 *
 *  Tue May 29 11:53:08 2007
 *  Copyright  2007  kf701
 *  Email <kf701.ye AT gmail.com>
 ****************************************************************************/

#include "factory.h"

#define CMMB_DAEMON_PATH        "/tmp/cmmb_daemon.socket"
#define CMMB_GUI_PATH           "/tmp/cmmb_gui.socket"

/* define head type */
#define SERVICE         1
#define CONTENT         2

typedef struct{
	uint8_t type;
	uint8_t padding;
	uint16_t len;
} net_hdr_t;

int main()
{
	debug_verbose = 4;
	char buf[128];
	((net_hdr_t*)buf)->type = SERVICE;
	int sock = unix_socket_new();
	//int sock = unix_socket_new_listen("/tmp/un_client.listen");
	int ret = unix_socket_send( sock, CMMB_DAEMON_PATH, buf, sizeof(buf) );
	if( ret < 0 )
		sys_debug("send err\n");
	sys_debug("send ret = %d\n", ret);
	unix_socket_free( sock );
	return 0;
}
